---
title: Invoke job by enum environment, JSON parameters
summary: Converts a UC4Environment enum value to a client id and delegates to the client-id, JSON-parameters flow. Marked Obsolete on the contract.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-22
operation_id: OP-003
trigger: A SOAP caller invokes ExecuteJobWithJson on the UC4 route
---

# OP-003: Invoke job by enum environment, JSON parameters (Obsolete)

This process backs the `ExecuteJobWithJson` operation, which is marked **`[Obsolete]`** on the contract — see [Operations](../operations.md). It converts a `UC4Environment` enum value to a client id, then delegates to [OP-004](execute-job-with-json-and-client-id.md). **Transaction boundary: none.**

| Field | Value |
| --- | --- |
| **Operation ID** | OP-003 |
| **Trigger** | SOAP caller invokes `ExecuteJobWithJson` |
| **Entry operation** | [`ExecuteJobWithJson`](../contracts/uc4-service.md#executejobwithjson) (Obsolete) |
| **Owning component** | `UC4Service.ExecuteJobWithJson` |
| **Inputs** | `environment` (`UC4Environment` enum), `jobName` (`string`), `jsonKeyValuePairs` (`string`) |
| **Outputs** | `UC4Result` — the mapped downstream result, or an empty result if the job is blocked |
| **Failure behavior** | Identical to [OP-004](execute-job-with-json-and-client-id.md) — an unhandled exception surfaces as a generic SOAP fault carrying full exception detail |

## Request and response

| Direction | Element | Type | Declared in | Notes |
| --- | --- | --- | --- | --- |
| Request | `environment` | `UC4Environment` enum | `UC4Service.cs` | Converted to a client id before use |
| Request | `jobName` | `string` | `UC4Service.cs` | The job to invoke |
| Request | `jsonKeyValuePairs` | `string` | `UC4Service.cs` | JSON-encoded key/value parameters |
| Response | `<return>` | `UC4Result`* | `UC4Service.cs` | Mapped downstream result, or an empty `UC4Result` if blocked |

## Steps

1. Accept `environment` (enum), `jobName`, and `jsonKeyValuePairs` from the SOAP request — see [BR-UC4-006](../business-rules.md#br-uc4-006-enum-operation-forms-are-obsolete).
2. Convert `environment` to a client id via `UC4EnvironmentFactory.GetUC4ClientId(environment)`.

   > **Origin**: Step 2 is implemented in `UC4EnvironmentFactory` (`SAIF.Framework.Core`, external, not documented by this run) and executed within this operation.*
   - On failure: an unmapped enum value throws → detailed WCF fault.*
3. Delegate to `ExecuteJobWithJsonAndClientId(clientId, jobName, jsonKeyValuePairs)`.

   > **Origin**: Step 3 delegates into [OP-004: Invoke job by client id, JSON parameters](execute-job-with-json-and-client-id.md), documented by this run.
   - On failure: any failure mode of the delegated flow surfaces identically here.
4. Return the result produced by the delegated flow to the caller.

## Process flow

```mermaid
flowchart TD
    A["Accept environment (enum),<br>jobName, jsonKeyValuePairs"] --> B["Convert enum to<br>client id"]
    B -->|"unmapped enum"| BFAULT["Detailed WCF fault"]
    B --> C["Delegate to<br>ExecuteJobWithJsonAndClientId"]
    C --> D{"Delegated flow<br>succeeds?"}
    D -->|"Yes"| E["Return UC4Result"]
    D -->|"No"| F["Detailed WCF fault<br>from delegated flow"]
```

## Transaction and side effects

| Aspect | Finding |
| --- | --- |
| Unit of work | None |
| Commit point | Not applicable — no persistence |
| Records written | None locally |
| Downstream calls | Same as [OP-004](execute-job-with-json-and-client-id.md) |
| Shared state touched | None |
| Repeat-call behavior | Not idempotent from the host's perspective |

## Faults and error handling

| Failure | Fault type the caller receives | Produced by | Source |
| --- | --- | --- | --- |
| Unmapped enum value | Generic SOAP fault, full exception detail | The WCF framework | `UC4Service.cs` |
| Any failure mode of the delegated flow | Generic SOAP fault, full exception detail | The WCF framework — no `IErrorHandler` is confirmed for this class | `UC4Service.cs` (delegation site) |

`UC4Service` carries `[LogErrorBehavior]`, an external `IServiceBehavior` whose implementation is not in this repository; its contribution is observability, not fault shaping — see [Faults and error pipeline](../faults.md).

## Authorization

| Requirement | Enforced by | Source | Applies to |
| --- | --- | --- | --- |
| [None in code](../authentication-authorization.md#access-requirements-per-operation) | Nothing — no attribute or programmatic check exists | `UC4Service.cs` | This operation |

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Activation and hosting](../activation-hosting.md)
- [Operations](../operations.md)
- [Faults and error pipeline](../faults.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `src/WCF/SAIF.Services.WCF.UC4.Host/UC4Service.cs`
